home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.0 / card_6402.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  105 lines

  1. -- card: 6402 from stack: in.0
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2612
  5. -- name: Talk
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A004
  11. -- rect: left=226 top=243 right=293 bottom=283
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 27056 / 27056
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Try it
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   talk "this is a test of the talk external command",150,150
  23. end mouseUp
  24.  
  25.  
  26.  
  27. -- part 2 (button)
  28. -- low flags: 00
  29. -- high flags: A003
  30. -- rect: left=82 top=302 right=324 bottom=182
  31. -- title width / last selected line: 0
  32. -- icon id / first selected line: 0 / 0
  33. -- text alignment: 1
  34. -- font id: 0
  35. -- text size: 12
  36. -- style flags: 0
  37. -- line height: 16
  38. -- part name: Install
  39. ----- HyperTalk script -----
  40. on mouseUp
  41.   if the optionkey is down then
  42.     pass mouseup
  43.   end if
  44.  
  45.   put (long name of this stack) into sourceStack
  46.   delete first word of sourceStack
  47.   delete first character of sourceStack
  48.   delete last character of sourceStack
  49.   put "Select a stack to copy this resource into."
  50.   put filename("STAK") into fname
  51.   if fname is empty then
  52.     hide message window
  53.     exit mouseup
  54.   end if
  55.   if sourcestack=fname then
  56.     beep
  57.     Answer "Get real.  You can't install it in this stack"
  58.     hide message window
  59.     exit mouseup
  60.   end if
  61.  
  62.   --
  63.   ModResCopy sourceStack,fname,"XCMD","Talk"
  64.   --
  65.   get the result
  66.   if first char of it is "E" then
  67.     put it into the message box
  68.     beep
  69.     answer "Attempt to install resource has failed."
  70.   else
  71.     beep
  72.     answer "Resource installation successful"
  73.   end if
  74.   hide message window
  75. end mouseUp
  76.  
  77.  
  78.  
  79. -- part contents for background part 2
  80. ----- text -----
  81. Talk
  82.  
  83. -- part contents for background part 13
  84. ----- text -----
  85. 8
  86.  
  87. -- part contents for background part 3
  88. ----- text -----
  89.  
  90. You can use this command to access Macintalk and make your Macintosh talk.  Be sure that Macintalk is in your system folder.
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97. Thanks to:
  98. ? (If anyone knows who wrote this please pass the information on so proper credit can be given.)
  99.  
  100.  
  101. -- part contents for background part 10
  102. ----- text -----
  103. Syntax:
  104.  
  105. Talk "text to speak",<rate>,<pitch>